Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BusinessTime::Config.time_zone #89

Closed
wants to merge 4 commits into from
Closed

BusinessTime::Config.time_zone #89

wants to merge 4 commits into from

Conversation

fengb
Copy link

@fengb fengb commented Sep 18, 2014

This separates BusinessTime time zone from the global Time.zone configuration. By default, it still pulls directly off Time.zone, but it can be changed separately.

@bokmann
Copy link
Owner

bokmann commented Nov 3, 2014

I'm curious - what is the use case for having business time follow a different time zone than the application itself? This feels like an odd complexity/duality to have to think about, given I'm striving for keeping the complexity of this code around the essential comlexity necessary for dates and hours...

@fengb
Copy link
Author

fengb commented Nov 4, 2014

The main reason for us is tech debt of not configuring timezones correctly... I completely understand if you don't want this kind of implementation, but it was a quick enough hack.

However, it'd be nice to be able to calculate business days in different contexts (i.e. business time in both New York and London).

@bokmann
Copy link
Owner

bokmann commented Apr 12, 2015

First, I'm sorry for the delay in dealing with this. Businesstime has been working fine for my purposes and I haven't had the headspace to get an understanding of some other people's use cases.

I just released 0.7.4, and need to release 0.8.0 with 2.2.0 support (and feature parity). Then I'll take care of the few outstanding pull requests for a 0.8.1.

I appreciate the quality of this pull request - nice comments, tests, and everything. I'm not sure I want to add the complexity of supporting a different time zone than the main application; I have a got feeling that if we do that, we'll end up with other people's edge cases of differing time zones from user input, the database, date calculations, etc. and that is the kind of complexity I tend to spend my career grooming out of applications.

As mentioned in other contexts, I trying not to support time zone configuration by request, and the 'nice to have' of timezone in different contexts might encourage more of that.

@kamaradclimber
Copy link

This PR could be useful for cases where code is UTC only but your test can run on developers machine which are not set to UTC. In this case, it is very easy to get tests passing on the CI (in UTC) but not on workstations.

@quietfoundation quietfoundation closed this by deleting the head repository Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants